/*
  DuinolabButtonBlink
  Turn on an LED when a button is pressed
  
  This example code is based on the Arduino Blink example.
 */
#include <Duinolab.h>
#include <Wire.h>      // need to get rid of this - Arduino IDE is too clever...

// DuinolabClass Duinolab = DuinolabClass(); 

void setup() {  
  // Connect LED 0 from the Duinolab  
  Duinolab.Init();

  // Connect green LED from the Duinolab  
  Duinolab.ConnectToArduino(LED_YELLOW);
  
  // Connect button 0
  Duinolab.ConnectToArduino(BUTTON_YELLOW);

}

void loop() {
if (Duinolab.ButtonPressed(BUTTON_YELLOW)) {
    Duinolab.LEDOn(LED_YELLOW);   // set the LED on
  } else {
    Duinolab.LEDOff(LED_YELLOW);  // set the LED off
  }
}
